import React from 'react'
import { Tooltip } from 'antd'
import { useDispatch } from '@/redux'
import { setToken } from '@/redux/modules/global'
import { useTranslation } from 'react-i18next'

const Logout = () => {
  const { t } = useTranslation()
  const dispatch = useDispatch()
  return (
    <Tooltip title={t('logout')}>
      <i className="icon-style iconfont icon-tuichu" onClick={() => dispatch(setToken(''))}></i>
    </Tooltip>
  )
}

export default Logout
